import java.util.ArrayList;
import java.util.List;


public class Zoo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		AnimalType[] types = AnimalType.values();
		AnimalFactory af = new AnimalFactory();
		List <Animal> animals = new ArrayList <Animal> ();
		
		for (int i=0; i<10; i++) {
			int typeindex = (int) Math.round (2 * Math.random());
			animals.add(af.newAnimal(types[typeindex]));
		}
		
		for (Animal a : animals)
			a.eat();
	}

}
